import request from '@/utils/request'
// 展示邮件模板
export const getEmailTemplate = (id = null) => request({
  url: `/admin/email/template?id=${id}`,
  method: 'get'
})

// 新增邮件模板
export const createEmailTemplate = (data) => request({
  url: '/admin/email/template',
  method: 'post',
  data
})

// 修改邮件模板
export const updateEmailTemplate = (data) => request({
  url: '/admin/email/template',
  method: 'put',
  data
})

// 修改邮件模板
export const deleteEmailTemplate = (data) => request({
  url: '/admin/email/template',
  method: 'delete',
  data
})

// 查询全部模板
export const pageQuery = (data) => request({
  url: '/admin/email/template/all',
  method: 'post',
  data
})
